package com.homework;

public class demo03 {
    public static void main(String[] args) {
        //定义计数器
        int count = 0;
        //外循环控制行数
        for (int i = 1; i <= 5; i++) {
            //内循环打印每行的@,满足条件了就换行，开启新一轮外循环
            for (int j = 0; ; j++) {
                System.out.print("@");
                count++;
                //判断@数量是否达标
                if (count == i) {
                    System.out.println();
                    //达标了就换行，将计数器清零重新记录下一行
                    count = 0;
                    break;
                }
            }
        }
    }
}
